<template>
	<view class="flex-col page">
		<view class="flex-col group">
			<view class="flex-col group_1">

				<view class="flex-col group_2">

					<view class="flex-col section_3">
						<view class="flex-row">
							<image :src="imgUrl+'16557867940327051981.png'" class="image_2" />
							<text class="text_9">验收固定表格</text>
						</view>
						<view class="flex-col group_9">
							<uni-table border emptyText="暂无更多数据">
								<!-- 表头行 -->
								<uni-tr style="background: rgba(29,106,255,0.0600);">
									<uni-th align="center">验收类目</uni-th>
									<uni-th align="center">验收提示</uni-th>
									<uni-th align="center">操作</uni-th>
								</uni-tr>
								<!-- 表格数据行 -->
								<uni-tr style="background-color: #ffffff;" v-for="(item,index) in list " :key="index">
									<uni-td align="center" width="80">{{item.acceptanceTypeName}}</uni-td>
									<uni-td>
										<view class="u-flex u-flex-col">
											<view class="u-flex-1  check1">
												<text class="text_16">{{item.acceptanceContent}}</text>
											</view>
											<view class="u-flex-1 check2">
												<text class="text_16">{{item.acceptanceTechnique}}</text>
											</view>
										</view>
									</uni-td>
									<uni-td align="center" width="80">
										<view class="check" @click="check(item)">查看</view>
										<!-- <text class="check" @click="check(index)">{{item.id?(item.acceptanceFlag==0?'合格':'不合格'):'验收'}}</text> -->
									</uni-td>
								</uni-tr>

							</uni-table>
						</view>
					</view>
				</view>
			</view>

			<view class="flex-col items-center button"><text class="text_31" @click="invitation">分享报告</text></view>

		</view>
		<shop-share v-model="share"></shop-share>
		<u-modal :show="show" :showConfirmButton="false" :show-title="false">
			<view class="u-flex u-flex-col  w-full u-p-20  u-relative">
				<view class="u-flex u-col-top u-row-center">
					<text class="font-600">验收</text>
					<u-icon class="close" name="close" @click="show=false"></u-icon>
				</view>

				<u--form style="width: 100%;height: 100%;padding:16rpx 30rpx;" labelWidth="100" labelPosition="left">
					<!-- 查看弹窗-验收类目 -->
					<u-form-item>
						<view class="u-flex-col">
								<text class="text121">验收类目</text>
							<view class="style-w-t2">{{form.acceptanceTypeName}}</view>
						</view>
					</u-form-item>
					<!-- 查看弹窗-检验 -->
					<u-form-item>
						<view class="u-flex-col">
							<text class="u-m-l-50 text121" style="">检验</text>
							<view class="style-w-t1">{{form.acceptanceFlag=='0'?'合格':'不合格'}}</view>
						</view>
					</u-form-item>
					<!-- 查看弹窗-备注 -->
					<u-form-item>
						<view class="u-flex-col">
							<text class="u-m-l-50 text121">备注</text>
							<view class="style-w-t" style="">{{form.acceptanceRemark}}</view>
							<!-- <textarea v-model="form.acceptanceRemark" class="u-m-t-10  remark" placeholder="请输入备注" /> -->
						</view>
					</u-form-item>
				</u--form>

				<view>

				</view>
			</view>
		</u-modal>
		
	</view>
</template>

<script>
	import _ from 'lodash'
	export default {
		components: {},
		data() {
			return {
				//验收
				imgUrl:this.$IMG_URL,
				list: [],
			    judge:0,
				share:false,
				show: false,
                form:{},
				projectId: '',
			}

		},
		onLoad(option) {
			console.log(option.projectId);
			this.projectId = option.projectId
			if(option.judge==6   || option.judge==4)
			{
				
			}else{
				
			}
		},
		onShow()
		{
		 this.$store.dispatch('checkHouse');	 	
		},
		created() {
			this.queryCommentsReport()
			this.queryHousing() //房屋信息 
			console.log(this.projectId)
		},
		methods: {
			check(item) {
				this.show = true;
				this.form=item;
			
			},
			queryCommentsReport() {
				this.$http('queryCommentsReport', { //固定表格内容
					projectId: this.projectId
				}).then(r => {
					if (r.code == 200) {
						this.list = r.data
					} else {
						console.log(r.msg);
					}
				});

			},

			queryHousing() {
				this.$http('queryComments.queryHousing').then(r => { //房屋信息
					if (r.code == 200) {
						this.roomTypeName = r.data.project.roomTypeName
						this.roomArea = r.data.project.roomArea
						this.district = r.data.project.district
						this.address = r.data.project.provinceName + ' ' + r.data.project.cityName + ' ' +
							r.data.project.districtName + ' ' + r.data.project.position
						this.projectId = r.data.project.projectId
						this.queryCommentsReport();
						
					
					} else {
						// this.$u.toast(r.msg);
						console.log(r.msg);
					}
				});
			},
			refuse() {
				this.show = true;
			},
			invitation() {
			
				// #ifdef APP-PLUS
				this.share = true;
				this.$store.commit('shareInfo',{
					title:'分享报告',
					path:this.$WEB_URL+'pages/my/report/reportshare?projectId='+this.projectId,
					image:''
				});
				// #endif
				// #ifdef H5
				uni.navigateTo({
					url:'/pages/my/report/reportshare?projectId='+this.projectId,
				})
				// #endif
			}
		},
	};
</script>

<style scoped lang="scss">
	.style-w-t {
		margin-left: 65px;
		width: 220px;
		height: 100px;
		transform: translateY(-20px);
	}

	.style-w-t1 {
		margin-left: 65px;
		width: 240px;
		height: 10px;
		transform: translateY(-20px);
		color: #1A76F2;
	}

	.style-w-t2 {
		margin-left: 65px;
		width: 240px;
		height: 10px;
		transform: translateY(-20px);
		color: #000000;
	}

	::v-deep .uni-table-td {
		padding: 0;
		color: #333333;
		font-size: 24rpx;
	}

	::v-deep .u-modal__content {
		padding: 0 !important;
	}

	.confirm {
		width: 100%;
		height: 72rpx;
		background: #1A76F2;
		border-radius: 36rpx;
		opacity: 1;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 28rpx;

		font-weight: 400;
		color: #FFFFFF;
	}

	.remark {
		background-color: #F6F7F9;
		border-radius: 16rpx;
		box-sizing: border-box;
		padding: 20rpx;
	}

	.close {
		position: absolute;
		right: 20rpx;
		top: 20rpx;
	}

	.check {
		font-size: 24rpx;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: 500;
		color: #1c4ca8;
	}

	.check1 {
		padding: 10rpx;

		background-color: #ffffff;
	}

	.text_16 {

		font-size: 22rpx;
		font-weight: 500;
		color: #333333;
	}

	.check2 {
		width: 100%;
		text-align: center;
		padding: 10rpx;
		background-color: #F2F6FF	;
	}

	.text_12 {
		align-self: center;
		color: #333333;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
		text-align: left;
		width: 313rpx;
	}

	.text121 {
		color: #bababa;
	}

	.text-wrapper {
		padding: 24rpx 0 32rpx;
		background-color: #1d6aff0f;
	}

	.text_15 {
		color: #333333;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
		text-align: left;
	}

	.page {
		background-color: #f6f7f9ff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100vh;
	}

	.group {
		padding: 0 24rpx 48rpx;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.group_1 {
		padding: 0rpx 0 48rpx;
	}

	.button {
		margin: 0 8rpx;
		padding: 24rpx 31rpx;
		background-color: #1d6aff;
		border-radius: 44rpx;
	}

	.text_1 {
		margin-left: 8rpx;
		align-self: flex-start;
		color: #ff371d;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.group_2 {
		margin-top: 10rpx;
	}

	.text_31 {
		color: #ffffff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.section_1 {
		background-color: #ffffff;
		border-radius: 16rpx;
	}

	.section_3 {
		margin-top: 21rpx;
		padding: 30rpx 24rpx 40rpx;
		background-color: #ffffff;
		border-radius: 16rpx;
	}

	.section_2 {
		padding: 29rpx 24rpx 31rpx;
		background-color: #ebf2ff;
		border-radius: 16rpx 16rpx 0px 0px;
	}

	.group_3 {
		padding: 30rpx 22rpx 41rpx 24rpx;
	}

	.group_9 {
		margin-top: 42rpx;

		position: relative;
	}

	.text_2 {
		margin-bottom: 4rpx;
		color: #1d6aff;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.image_1 {
		margin-top: 10rpx;
		width: 30rpx;
		height: 32rpx;
	}

	.group_5 {
		margin-top: 39rpx;
	}

	.image_2 {
		margin-top: 18rpx;
		width: 26rpx;
		height: 16rpx;
	}

	.text_9 {
		margin-left: 12rpx;
		color: #191919;
		font-size: 32rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 38rpx;
	}

	.section_4 {
		padding: 20rpx 39rpx 0;
		background-image: url('https://project-user-resource-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b14c62d02982001153329a/16557868931139600616.png');
		background-position: 0% 0%;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}

	.section_5 {
		padding: 19rpx 29rpx 27rpx 30rpx;
		border-radius: 4rpx 4rpx 0 0;
		background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/617a2ca7e4f1450011362b37/62b14c62d02982001153329a/16557868004904926678.png');
		background-size: 100% 100%;
		background-repeat: no-repeat;
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
	}

	.section_6 {
		background-color: #d9d9d9;
		width: 1rpx;
		height: 1206rpx;
		position: absolute;
		left: 148rpx;
		top: 0;
	}

	.section_7 {
		background-color: #d9d9d9;
		width: 1rpx;
		height: 1206rpx;
		position: absolute;
		right: 148rpx;
		top: 0;
	}

	.text_3 {
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_4 {
		color: #1d6aff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.group_7 {
		margin-top: 33rpx;
	}

	.group_10 {
		margin-right: 10rpx;
		height: 632rpx;
	}

	.group_15 {
		margin-top: 15rpx;
	}

	.text-wrapper_2 {
		padding: 24rpx 0 32rpx;
		align-self: center;
		background-color: #1d6aff0f;
		width: 356rpx;
	}

	.text-wrapper_5 {
		width: 88rpx;
	}

	.text_5 {
		margin-bottom: 6rpx;
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_6 {
		margin-top: 6rpx;
		color: #1d6aff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_7 {
		color: #333333;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.text_8 {
		color: #1d6aff;
		font-size: 28rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 33rpx;
	}

	.group_11 {
		margin-top: 95rpx;
	}

	.text_13 {
		margin-top: -123rpx;
	}

	.group_12 {
		margin-top: 36rpx;
	}

	.text_20 {
		margin-top: 19rpx;
	}

	.text_21 {
		margin-top: 3rpx;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_22 {
		margin-right: 10rpx;
		margin-bottom: 3rpx;
		color: #1d6aff;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.group_17 {
		flex: 1 1 auto;
	}

	.text_26 {
		margin: 298rpx 10rpx 0 40rpx;
		color: #1d6aff;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_27 {
		margin-left: 20rpx;
		margin-right: 23rpx;
		color: #333333;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
		text-align: left;
	}

	.text_28 {
		color: #666666;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_29 {
		color: #666666;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_30 {
		color: #666666;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
	}

	.text_10 {
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_11 {
		color: #1d6aff;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.group_13 {
		flex: 1 1 auto;
	}

	.text_19 {
		margin-left: 40rpx;
		margin-top: 193rpx;
		color: #1d6aff;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.group_18 {
		align-self: flex-end;
		width: 356rpx;
	}

	.text_25 {
		margin-top: 6rpx;
		align-self: flex-start;
		color: #333333;
		font-size: 24rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 28rpx;
	}

	.text_14 {
		font-size: 22rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #333333;
	}

	.group_14 {
		margin-left: 37rpx;
		flex: 1 1 auto;
	}

	.text-wrapper_1 {
		padding: 24rpx 0 44rpx;
		background-color: #1d6aff0f;
	}

	.text_24 {
		margin: 19rpx 23rpx 0 20rpx;
		color: #333333;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
		text-align: left;
	}

	.text_17 {
		margin: 19rpx 23rpx 0 20rpx;
		color: #333333;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
		text-align: left;
	}

	.view_1 {
		margin-top: 30rpx;
	}

	.text_23 {
		margin-left: 20rpx;
		margin-right: 23rpx;
		color: #333333;
		font-size: 22rpx;
		font-family: '.AppleSystemUIFont';
		line-height: 26rpx;
		text-align: left;
	}

	.text_18 {
		margin-left: 20rpx;
		margin-right: 23rpx;
	}
</style>
